package qx.hyj.petrescue.param;

import java.util.StringJoiner;

/**
 * ^_^ author: LaoYe
 * ^_^ date: 2024.07.29
 * 带分页统计的模型
 */
public class PageModel<T> {

    public long total;

    public T data;

    public PageModel() {
    }



    public PageModel(long total, T data) {
        this.total = total;
        this.data = data;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", PageModel.class.getSimpleName() + "[", "]")
                .add("total=" + total)
                .add("data=" + data)
                .toString();
    }
}

